#ifndef SERVER_H
#define SERVER_H

#include <QWidget>
#include <QTcpServer>
#include <QTcpSocket>
#include <QLineEdit>
#include <QTextEdit>
#include <QLabel>


class QPushButton;

class Server : public QWidget
{
    Q_OBJECT
public:
    explicit Server(QWidget *parent = 0);
    ~Server();

protected slots:
    void newConnected();
    void readMsg();
    void sendMsg();

private:
    QTcpServer* m_tcpServer;
    QTcpSocket* m_tcpSocket;
    QLineEdit* sendLineEdit;
    QTextEdit* recvTextEdit;
    QLabel* statusLabel;
    QPushButton *sendBtn;
};

#endif // SERVER_H
